package com.wuyi.controller;

import com.wuyi.pojo.Resource;
import com.wuyi.service.CategoryService;
import com.zc.utils.JSONResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 曾川
 * @version 1.0.0
 * @ClassName CategoryController.java
 * @Description 用于分类的相关接口
 * @createTime 2021年11月03日 19:45:00
 */
@Api(value = "分类",tags = {"用于分类的相关接口"})
@RestController
@RequestMapping("category")
public class CategoryController {

    public final static Logger logger = LoggerFactory.getLogger(ResourceController.class);

    @Autowired
    private CategoryService categoryService;

    @ApiOperation(value = "获取分类列表（可调试）", notes = "获取分类列表（可调试）", httpMethod = "GET")
    @GetMapping("/list")
    public JSONResult list() {
        return JSONResult.ok(categoryService.list());
    }

}
